﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PCR.Base
{
    /// <summary>
    /// Patient's gender type
    /// </summary>
    public enum Gender
    {
        MAN,
        WOMEN
    }

    /// <summary>
    /// Vitrus check method type
    /// </summary>
    public enum CheckMethod
    {
        HPV,
        OTHER
    }

    /// <summary>
    /// Virus sample type
    /// </summary>
    public enum SampleType
    {
        NECKUTERUS,
        SKIN,
        WEASAND,
        OTHER
    }

    /// <summary>
    /// Virus sample state type
    /// </summary>
    public enum SampleState
    {
        UNKNOWN,
        WELL,
        NOTWELL
    }

    /// <summary>
    /// PatientVirus interface, defined the patient's virus type and value
    /// </summary>
    public interface IPatientVirus
    {
        /// <summary>
        /// Virus type object ID, because the IVirusType name and value may changed
        /// we just store a link here, you need to find the real value when you want
        /// to use it
        /// </summary>
        Guid VirusTypeID { get; set; }

        /// <summary>
        /// Get or set the current virus CT
        /// </summary>
        double VirusCTVal { get; set; }

        /// <summary>
        /// Get or set the reference Cell CT
        /// </summary>
        double ReferCellCTVal { get; set; }

        /// <summary>
        /// Get the revised CT
        /// </summary>
        double RevisedCT { get; }

        /// <summary>
        /// Get virus exponent
        /// calculated by active standard curve, virus parameter and 
        /// current CT value
        /// </summary>
        double Exponent { get; }
    }

    /// <summary>
    /// Patient report interface that contains all the attributes of a patient's report
    /// </summary>
    public interface IPatientReport : IGuidObject
    {
        /// <summary>
        /// Report's generation date
        /// </summary>
        DateTime ReportDate { get; set; }

        /// <summary>
        /// Report Serial number
        /// </summary>
        string ReportID { get; set; }

        /// <summary>
        /// Patient's Name
        /// </summary>
        string Name { get; set; }
        
        /// <summary>
        /// Patient's Age
        /// </summary>
        UInt32 Age { get; set; }

        /// <summary>
        /// Patient's Gender
        /// </summary>
        Gender Gender { get; set; }

        /// <summary>
        /// Patient's check date
        /// </summary>
        DateTime CheckDate { get; set; }

        /// <summary>
        /// Patient's check date
        /// </summary>
        string SampleID { get; set; }

        /// <summary>
        /// Virus sample reveice date
        /// </summary>
        DateTime SampleReceiveDate { get; set; }

        /// <summary>
        /// Virus check method
        /// </summary>
        CheckMethod CheckMethod { get; set; }

        /// <summary>
        /// Virus sample type
        /// </summary>
        SampleType SampleType { get; set; }

        /// <summary>
        /// Virus sample state
        /// </summary>
        SampleState SampleState { get; set; }

        /// <summary>
        /// Patient virus list, add or remove item from the list
        /// </summary>
        IList<IPatientVirus> PatientVirusList { get; }

        /// <summary>
        /// Cell principle wrote by doctor
        /// </summary>
        string CellPrinciple { get; set; }

        /// <summary>
        /// Pathology Principle wrote by doctor
        /// </summary>
        string PathologyPrinciple { get; set; }
    }

    /// <summary>
    /// Patients' reports manager interface, contains all the operations of the patients' reports
    /// </summary>
    public interface IPatientManager : IObjectRepository<IPatientReport>
    {
    }
}
